#ifndef     __ROBOT_ARM1_H
#define     __ROBOT_ARM1_H

#include "../utils/arm_ctrl.h"
#include "../utils/no_copyable.h"
#include "../utils/object.h"

namespace driver {

class RobotArm1 : utils::no_copyable_t, 
    public utils::ArmCtrl<RobotArm1>
{
public:
    static constexpr uint32_t POSITION_MIN = 261;
    static constexpr uint32_t POSITION_MAX = 780;

    RobotArm1();

    static void test(dir_t dir, uint8_t val) {
        set_dir(dir);
        set_voltage(val);
    }

    static uint16_t get_raw_position();
    static void set_dir(dir_t dir);
    static void set_voltage(uint8_t val);

    void adjust();
    void set_ctrl_min(uint32_t val);
};

inline utils::object_t<RobotArm1> robotArm1;

}

#endif
